<template>
  <div class="hNewLine" style="padding-right:10px;">
    <h3 class="gl_title">
        <!-- 7*24小时标题链接 -->
        <a href="http://live.163.com/room/222080.html"><img src="http://static.ws.126.net/f2e/finance/index2016/images/lf_gl_title.png" alt="全球直播"></a>
    </h3>
    <el-timeline>
      <el-timeline-item v-for="(item, index) in newLine" :key="index"
        :timestamp="item.ptime" placement="top" size="normal">
        {{item.title}}
      </el-timeline-item>
    </el-timeline>
  </div>
</template>

<script>
import jsonp from 'jsonp'
export default {
  data() {
    return {
      newLine:[]
    }
  },
  methods: {
    getNewLine(){
      var _that=this;
      var param = {
        param: "bowlder"
      };
      window.bowlder= function(res) {
          console.log("*************72小时快讯**************")
          console.log(res.data.items)
          _that.newLine=res.data.items
      }
      // https://data.live.126.net/liveAll/222080.json
      jsonp('https://gw.m.163.com/nc/api/v1/telegram/list?stId=ST1588041997867&topicId=00259FVR&callback=bowlder',param,(err,res)=>{
        if(!err){
          
        }
      })
      /* jsonp('http://api3.finance.ifeng.com/live/getclsnew??beg=1589997348&end=1589824548&cb=_434e1d6218b046b51e30870ea0b9062e',param,(err,res)=>{
        if(!err){
          console.log("*************72小时快讯**************")
          console.log(res)
          console.log(res.data)
          this.newLine=res.data
        }
      }) */
    }
  },
  created() {
    this.getNewLine()
  }
}
</script>

<style>
ul.el-timeline {
  padding: 0 5px;
  margin: 10px 5px 20px;
  max-height: 600px;
  overflow-y: auto;
  background-color: #fff;
}
.el-timeline-item__content {
  margin-left:5px;
}
</style>
